import request from '@/utils/request'

export function getMethodologies(data) {
  console.log(data)
  return request({
    url: '/methodologies',
    method: 'get',
    params: data
  })
}

export function searchMethodologies(data) {
  console.log(data)
  return request({
    url: '/methodologies/search',
    method: 'get',
    params: data
  })
}

export function createMethodologies(data) {
  return request({
    url: '/methodologies',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: data
  })
}

export function deleteMethodologies(id) {
  return request({
    url: `/methodologies/${id}`,
    method: 'delete'
  })
}

export function updateMethodologies(data) {
  return request({
    url: '/methodologies',
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json'
    },
    data: data
  })
}

export function retrieveMethodologies(data) {
  console.log(data)
  return request({
    url: '/methodology/retrieve',
    method: 'get',
    params: data
  })
}

export function getMethodById(id) {
  return request({
    url: `/methodology/${id}`,
    method: 'get'
  })
}
